//
//  FilterViewModel.swift
//  Automobile
//
//  Created by erkebulan elzhan on 8/1/20.
//  Copyright © 2020 erkebulan elzhan. All rights reserved.
//

import Foundation

typealias FilterGeneralCellConfigurator = TableCellConfigurator<GeneralCell, Filter.FilterGeneral>
typealias FilterCarCellConfigurator = TableCellConfigurator<FilterCarCell, Filter.FilterCar>
typealias FilterOptionalCellConfigurator = TableCellConfigurator<FilterOptionalCell, Filter.FilterOptional>
typealias FilterChecksCellConfigurator = TableCellConfigurator<FilterChecksCell, Filter.FilterChecks>


class FilterViewModel {
    
    var items: [CellConfigurator]! = []
    
    init (filter: Filter) {
        items = [
            FilterGeneralCellConfigurator(item: filter.filterGeneral),
            FilterCarCellConfigurator(item: filter.filterCar),
            FilterOptionalCellConfigurator(item: filter.filterOptional),
            FilterChecksCellConfigurator(item: filter.filterChecks)
        ]
    }
}
